import body from '@/components/body'
import childView from '@/components/appMain.vue'

const templateTree = resolve => {
  require(['@/views/interface/template/tree.vue'], resolve)
}; //
const templateList = resolve => {
  require(['@/views/interface/template/list.vue'], resolve)
}; //
const templateEdit = resolve => {
  require(['@/views/interface/template/edit.vue'], resolve)
}; //
const templateReName = resolve => {
  require(['@/views/interface/template/rename.vue'], resolve)
}; //
const templateSetting = resolve => {
  require(['@/views/interface/template/setting.vue'], resolve)
}; //
const resourceTree = resolve => {
  require(['@/views/interface/resource/tree.vue'], resolve)
}; //
const resourceList = resolve => {
  require(['@/views/interface/resource/list.vue'], resolve)
}; //
const resourceEdit = resolve => {
  require(['@/views/interface/resource/edit.vue'], resolve)
}; //
const resourceReName = resolve => {
  require(['@/views/interface/resource/rename.vue'], resolve)
}; //
const operateRouter =
  {
    path: '/operate',
    component: body,
    iconCls: 'icon-yunying',
    name: '运营', //
    meta: {
      isLink: true
    },
    children: [

      {
        path: '/link',
        name: '友情链接',//友情链接
        component: childView,
        isParent: true,
        redirect: '/link/list',
        children: [{
          path: '/link/list',//友情链接列表
          name: '友情链接列表',
          component: resolve => {
            require(['@/views/operate/link/list.vue'], resolve)
          },
        }, {
          path: '/link/save',//友情链接添加
          name: '友情链接添加',
          component: resolve => {
            require(['@/views/operate/link/edit.vue'], resolve)
          },
        }, {
          path: '/link/update',//友情链接修改
          name: '友情链接修改',
          component: resolve => {
            require(['@/views/operate/link/edit.vue'], resolve)
          },
        }, {
          path: '/link/typeList',//友情链接类别列表
          name: '类别列表',
          component: resolve => {
            require(['@/views/operate/link/typeList.vue'], resolve)
          },
        }
        ]
      },
      // {
      //   path: '/ad',
      //   name: '广告管理',//广告管理
      //   component: childView,
      //   isParent: true,
      //   redirect: '/ad/list',
      //   children: [{
      //     path: '/ad/list',//广告管理
      //     name: '广告列表',
      //     component: resolve => {
      //       require(['@/views/operate/ad/list.vue'], resolve)
      //     },
      //   }, {
      //     path: '/ad/save',//广告添加
      //     name: '广告添加',
      //     component: resolve => {
      //       require(['@/views/operate/ad/edit.vue'], resolve)
      //     },
      //   }, {
      //     path: '/ad/update',//广告修改
      //     name: '广告修改',
      //     component: resolve => {
      //       require(['@/views/operate/ad/edit.vue'], resolve)
      //     },
      //   }, {
      //     path: '/adSpace/list',//广告版位列表
      //     name: '广告版位列表',
      //     component: resolve => {
      //       require(['@/views/operate/ad/typeList.vue'], resolve)
      //     },
      //   }
      //   ]
      // },

      // {
      //   path: '/contentBuy',
      //   name: '内容购买记录',//内容购买记录
      //   component: childView,
      //   isParent: true,
      //   redirect: '/contentBuy/list',
      //   children: [
      //     {
      //       path: '/contentBuy/list',////内容购买记录列表
      //       name: '内容购买记录列表',
      //       component: resolve => {
      //         require(['@/views/operate/contentBuy/list.vue'], resolve)
      //       },
      //     },
      //   ]
      // },
      // {
      //   path: '/userAccount',
      //   name: '用户账户统计',//用户账户统计
      //   component: childView,
      //   isParent: true,
      //   redirect: '/userAccount/list',
      //   children: [
      //     {
      //       path: '/userAccount/list',////用户账户统计列表
      //       name: '用户账户统计列表',
      //       component: resolve => {
      //         require(['@/views/operate/userAccount/list.vue'], resolve)
      //       },
      //     },
      //   ]
      // },
      // {
      //   path: '/charge',
      //   name: '内容收费统计',//内容收费统计
      //   component: childView,
      //   isParent: true,
      //   redirect: '/charge/list',
      //   children: [
      //     {
      //       path: '/charge/list',////内容收费统计列表
      //       name: '内容收费统计列表',
      //       component: resolve => {
      //         require(['@/views/operate/charge/list.vue'], resolve)
      //       },
      //     },
      //     {
      //       path: '/charge/commission',////2）平台佣金所得
      //       name: '平台佣金所得',
      //       component: resolve => {
      //         require(['@/views/operate/charge/commissionStatic.vue'], resolve)
      //       },
      //     },
      //   ]
      // },
      // {
      //   path: '/accountPay',
      //   name: '转账管理',//转账管理
      //   component: childView,
      //   isParent: true,
      //   redirect: '/accountPay/list',
      //   children: [
      //     {
      //       path: '/accountPay/list',////转账管理列表
      //       name: '转账列表',
      //       component: resolve => {
      //         require(['@/views/operate/accountPay/list.vue'], resolve)
      //       },
      //     },
      //   ]
      // },
      // {
      //   path: '/drawApply',
      //   name: '提现管理',//提现管理
      //   component: childView,
      //   isParent: true,
      //   redirect: '/drawApply/list',
      //   children: [
      //     {
      //       path: '/drawApply/list',////提现管理列表
      //       name: '提现列表',
      //       component: resolve => {
      //         require(['@/views/operate/drawApply/list.vue'], resolve)
      //       },
      //     },
      //     {
      //       path: '/drawApply/traAccount',////转账
      //       name: '转账',
      //       component: resolve => {
      //         require(['@/views/operate/drawApply/TransferAccounts.vue'], resolve)
      //       },
      //     }
      //   ]
      // },
      // {
      //   path: '/comment',
      //   name: '评论管理',//评论管理
      //   component: childView,
      //   isParent: true,
      //   redirect: '/comment/list',
      //   children: [{
      //     path: '/comment/list',//评论列表
      //     name: '评论列表',
      //     component: resolve => {
      //       require(['@/views/operate/comment/list.vue'], resolve)
      //     },
      //   }, {
      //     path: '/comment/itemList',//评论查看
      //     name: '评论查看',
      //     component: resolve => {
      //       require(['@/views/operate/comment/itemList.vue'], resolve)
      //     },
      //   }
      //   ]
      // },
      // {
      //   path: '/job',
      //   name: '职位申请',//职位申请
      //   component: childView,
      //   isParent: true,
      //   redirect: '/job/list',
      //   children: [
      //     {
      //       path: '/job/list',//职位申请
      //       name: '职位申请列表',
      //       component: resolve => {
      //         require(['@/views/operate/job/list.vue'], resolve)
      //       },
      //     },
      //     {
      //       path: '/job/seek',//简历查看
      //       name: '简历查看',
      //       component: resolve => {
      //         require(['@/views/operate/job/view.vue'], resolve)
      //       },
      //     }
      //   ]
      // },
      {
        path: '/db',
        name: '数据备份',//数据备份
        component: childView,
        children: [
          {
            path: '/backups',
            name: '备份',
            component: childView,
            redirect: '/backups/list',
            children: [
              {
                path: '/backups/list',
                name: '备份列表',
                component: resolve => {
                  require(['@/views/operate/db/backups/list.vue'], resolve)
                },
              },
              {
                path: '/backups/seek',
                name: '表字段列表',
                component: resolve => {
                  require(['@/views/operate/db/backups/seek.vue'], resolve)
                },
              }
            ]
          },
          {
            path: '/revert',
            name: '恢复',
            component: resolve => {
              require(['@/views/operate/db/revert/edit.vue'], resolve)
            },
          },
          {
            path: '/backupsDir',
            name: '备份目录',
            component: childView,
            redirect: '/backupsDir/list',
            children: [
              {
                path: '/backupsDir/list',
                name: '备份目录列表',
                component: resolve => {
                  require(['@/views/operate/db/backupsDir/list.vue'], resolve)
                },
              },
              {
                path: '/backupsDir/edit',
                name: '备份目录重命名',
                component: resolve => {
                  require(['@/views/operate/db/backupsDir/edit.vue'], resolve)
                },
              },
            ]
          },
        ]
      },
      // {
      //   path: '/guestbook',
      //   name: '留言管理',
      //   component: childView,
      //   isParent: true,
      //   redirect: '/guestbook/list',
      //   children: [{
      //     path: '/guestbook/list',
      //     name: '留言列表',
      //     component: resolve => {
      //       require(['@/views/operate/guestbook/list.vue'], resolve)
      //     },
      //   }, {
      //     path: '/guestbook/add',
      //     name: '留言新增',
      //     component: resolve => {
      //       require(['@/views/operate/guestbook/edit.vue'], resolve)
      //     },
      //   }, {
      //     path: '/guestbookType/list',
      //     name: '留言类型列表',
      //     component: resolve => {
      //       require(['@/views/operate/guestbook/typeList.vue'], resolve)
      //     },
      //   }
      //   ]
      // },
      // {
      //   path: '/weixin',
      //   name: '公众号设置',//公众号设置
      //   component: childView,
      //   children: [
      //     {
      //       path: '/weixinConfig',//公众号设置
      //       name: '公众号设置',
      //       component: resolve => {
      //         require(['@/views/operate/weixinConfig/weixinUpdate.vue'], resolve)
      //       },
      //     },
      //     {
      //       path: '/weixinMenu',//自定义菜单
      //       name: '自定义菜单',
      //       component: childView,
      //       redirect: '/weixinMenu/list',
      //       children: [
      //         {
      //           path: '/weixinMenu/list',////自定义菜单列表
      //           name: '自定义菜单列表',
      //           component: resolve => {
      //             require(['@/views/operate/weixinConfig/weixinMenu/list.vue'], resolve)
      //           },
      //         },
      //         {
      //           path: '/weixinMenu/add',////自定义菜单添加
      //           name: '自定义菜单添加',
      //           component: resolve => {
      //             require(['@/views/operate/weixinConfig/weixinMenu/edit.vue'], resolve)
      //           },
      //         },
      //         {
      //           path: '/weixinMenu/edit',////自定义菜单修改
      //           name: '自定义菜单修改',
      //           component: resolve => {
      //             require(['@/views/operate/weixinConfig/weixinMenu/edit.vue'], resolve)
      //           },
      //         },
      //         {
      //           path: '/weixinMenu/child',////自定义菜单二级菜单
      //           name: '自定义菜单二级菜单',
      //           component: childView,
      //           redirect: '/weixinMenu/child/list',
      //           children: [
      //             {
      //               path: '/weixinMenu/child/list',////自定义菜单列表
      //               name: '二级菜单列表',
      //               component: resolve => {
      //                 require(['@/views/operate/weixinConfig/weixinMenu/weixinChildMenu/list.vue'], resolve)
      //               },
      //             },
      //             {
      //               path: '/weixinMenu/child/add',////自定义菜单添加
      //               name: '二级菜单添加',
      //               component: resolve => {
      //                 require(['@/views/operate/weixinConfig/weixinMenu/weixinChildMenu/edit.vue'], resolve)
      //               },
      //             },
      //             {
      //               path: '/weixinMenu/child/edit',////自定义菜单修改
      //               name: '二级菜单修改',
      //               component: resolve => {
      //                 require(['@/views/operate/weixinConfig/weixinMenu/weixinChildMenu/edit.vue'], resolve)
      //               },
      //             },
      //           ]
      //
      //         },
      //       ]
      //     },
      //     {
      //       path: '/weixinMessage',//自定义回复
      //       name: '自定义回复',
      //       component: childView,
      //       redirect: '/weixinMessage/list',
      //       children: [
      //         {
      //           path: '/weixinMessage/list',////自定义菜单列表
      //           name: '自定义回复列表',
      //           component: resolve => {
      //             require(['@/views/operate/weixinConfig/weixinMessage/list.vue'], resolve)
      //           },
      //         },
      //         {
      //           path: '/weixinMessage/add',////自定义菜单添加
      //           name: '自定义回复添加',
      //           component: resolve => {
      //             require(['@/views/operate/weixinConfig/weixinMessage/edit.vue'], resolve)
      //           },
      //         },
      //         {
      //           path: '/weixinMessage/edit',////自定义菜单修改
      //           name: '自定义回复修改',
      //           component: resolve => {
      //             require(['@/views/operate/weixinConfig/weixinMessage/edit.vue'], resolve)
      //           },
      //         },
      //       ]
      //     },
      //     {
      //       path: '/weixinMessageDef',//默认回复
      //       name: '默认回复',
      //       component: resolve => {
      //         require(['@/views/operate/weixinConfig/weixinDefUpdate.vue'], resolve)
      //       },
      //     },
      //   ]
      // },
      {
        path: '/statically',
        name: '页面静态化',//页面静态化
        component: childView,
        children: [
          {
            path: '/statically/indexStatic',//首页静态化
            name: '首页静态化',
            component: resolve => {
              require(['@/views/operate/statically/indexStatic.vue'], resolve)
            },
          },
          {
            path: '/statically/channelStatic',//栏目静态化
            name: '栏目静态化',
            component: resolve => {
              require(['@/views/operate/statically/channelStatic.vue'], resolve)
            },
          },
          {
            path: '/statically/contentStatic',//内容静态化
            name: '内容静态化',
            component: resolve => {
              require(['@/views/operate/statically/contentStatic.vue'], resolve)
            },
          },
        ]
      },


    ]
  }
export default operateRouter
